<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="http://localhost:9080/trade_platform/js/jquery/jquery-1.8.0.min.js" ></script>
<script type="text/javascript" src="http://localhost:9080/trade_platform/js/jquery/jquery-1.8.3.js" ></script>
<script type="text/javascript" src="http://localhost:9080/trade_platform/js/json2.js" ></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>post TEST</title>
</head>
<body>
orderNo : <input id="orderNo" type="text" value="20161115010122075"/> <br>
authCode : <input id="authCode" type="text" /> <br>
loginName : <input id="loginName" type="text" value="DFC" /> <br>
subAccountId : <input id="subAccountId" type="text" value="H2902"/> <br>
totalFee : <input id="totalAmount" type="text" value="0.01"/> <br>
spbillCreateIp : <input id="spbillCreateIp" type="text" value="172.26.130.67"/> <br>
<button id="button1" onclick="sendPostReq()">click to send the post req</button>
<script type="text/javascript">
 
function sendPostReq() {
	var orderNo = $('#orderNo').val();
	var authCode = $('#authCode').val();
	var loginName = $('#loginName').val();
	var subAccountId = $('#subAccountId').val();
	var totalAmount = $('#totalAmount').val();
	var spbillCreateIp = $('#spbillCreateIp').val();
	var params = new Object();
	params.orderNo=orderNo;
	params.subject=orderNo;
	params.totalAmount=totalAmount;
	params.spbillCreateIp=spbillCreateIp;
	params.authCode=authCode;
	params.body='Iphone616G';
	params.subAccountId=subAccountId;
	params.payGate='1';
	params.payType='1';
	params.notifyUrl='http://localhost:9080/trade_platform/sys/trade/customertrade';
	params.remark='123';
	//params.detail='[{"goods_id":"apple01","goods_name":"ipad","quantity":"1","price":"2000"}]';
	params.detail='[]';
	params.loginName=loginName;
	params.remark=orderNo;
	$.ajax({
	    url:'http://localhost:9080/pay-platform/sys/trade/customertrade',
	    contentType : 'application/json' ,
	    dataType:'JSON',
	    type:'POST',
	    data: JSON.stringify(params)
	});
}
</script>
</body>
</html>